<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link type="text/css" href="../../css/system.css" rel="stylesheet"/>
<link type="text/css" href="../../js/jDialog/jDialog.css" rel="stylesheet" >
<script type="text/javascript" src="../../js/jDialog/jquery.dialog.js"></script>
<script type="text/javascript" src="../../js/jquery-1.11.1.min.js"></script>
<title>求职者</title>
<script type="text/javascript">
var gUserPhoto;
var gUserNickName;
var gUserPwd;
var gUserSex;
$(document).ready(function() {
	$.ajax({
		type : 'post',
		dataType : 'text',
		async: false,
		url : '../../user/getUserSession.action',
		success : function(msg) {
			if (msg != 0 && msg != null) {
				userObj = JSON.parse(msg);
				gUserPhoto = userObj[0].userPhoto;
				gUserNickName = userObj[0].userNickName;
				gUserPwd = userObj[0].userPwd;
				gUserSex = userObj[0].userSex;
			}	
		}
	});
	$("#headPhoto").attr("src",gUserPhoto); 
	document.getElementById("nickname").innerHTML=gUserNickName;
	$("#intro")[0].contentWindow.userObj=userObj;
	$("#showc")[0].contentWindow.userObj=userObj;
	$("#userI")[0].contentWindow.userObj=userObj;
	$("#updaU")[0].contentWindow.userObj=userObj;
});
$.logout = function(){
	var dialog = jDialog.confirm('您确定要退出系统?',{
		handler : function(button,dialog) {
			$.ajax({
				type : 'post',
				dataType : 'text',
				async: false,
				url : '../../user/logoutCheck.action',
				success : function(msg) {
					window.location.href = "../../user_login.html";
				},
				error : function(msg) {
					window.location.href = "../../user_login.html";
				}
			});
			dialog.close();
		}
	},{
		handler : function(button,dialog) {
			dialog.close();
		}
	});
}
$.chanIframe = function(th){
	var idd = th.id;
	if(idd == 'menu1'){
		$("#menu1").css('background','#C0C0C0');
		$("#menu2").css('background','#66B3FF');
		$("#menu3").css('background','#66B3FF');
		$("#menu4").css('background','#66B3FF');
		$("#intro").css('display', 'block');
		$("#showc").css('display', 'none');
		$("#userI").css('display', 'none');
		$("#updaU").css('display', 'none');
	}
	if(idd == 'menu2'){
		$("#menu2").css('background','#C0C0C0');
		$("#menu1").css('background','#66B3FF');
		$("#menu3").css('background','#66B3FF');
		$("#menu4").css('background','#66B3FF');
		$("#intro").css('display', 'none');
		$("#showc").css('display', 'block');
		$("#userI").css('display', 'none');
		$("#updaU").css('display', 'none');
	}
	if(idd == 'menu3'){
		$("#menu3").css('background','#C0C0C0');
		$("#menu2").css('background','#66B3FF');
		$("#menu1").css('background','#66B3FF');
		$("#menu4").css('background','#66B3FF');
		$("#intro").css('display', 'none');
		$("#showc").css('display', 'none');
		$("#userI").css('display', 'none');
		$("#updaU").css('display', 'block');
	}
	if(idd == 'menu4'){
		$("#menu3").css('background','#66B3FF');
		$("#menu2").css('background','#66B3FF');
		$("#menu1").css('background','#66B3FF');
		$("#menu4").css('background','#C0C0C0');
		$("#intro").css('display', 'none');
		$("#showc").css('display', 'none');
		$("#userI").css('display', 'block');
		$("#updaU").css('display', 'none');
	}
}
</script>
</head>
<body>
<div style="position:relative;">
<div id="hidDiv">
<a onclick="$.logout()">退出登录</a>
</div>
<div id="topDiv">
<div class="logo"><img src="../../images/earth-globe.png"/></div>
<div class="logo1">招聘网</div>
<div class="topLink">
<img id="headPhoto"/><span id="nickname"></span>
</div>
</div>
<div id="leftMenu">
<div class="clickDiv menuDiv" id="menu1" onclick="$.chanIframe(this)"><img src="../../images/perinf.png"/>个人简历</div>
<div class="clickDiv menuDiv" id="menu2" onclick="$.chanIframe(this)"><img src="../../images/prjob.png"/>招聘信息</div>
<div class="clickDiv menuDiv" id="menu4" onclick="$.chanIframe(this)"><img src="../../images/deliverResultpng.png"/>投递结果</div>
<div class="clickDiv menuDiv" id="menu3" onclick="$.chanIframe(this)"><img src="../../images/chapwd.png"/>修改密码</div>
</div>
<div id="rightPage">
 <iframe  style="display:none" src="introduce.html" name="intro" id="intro" width="100%" height="550px" > </iframe>
 <iframe  src="showCompany.html" name="showc" id="showc" width="100%" height="550px" > </iframe>
 <iframe style="display:none" src="deliverResult.html" name="userI" id="userI" width="100%" height="550px" > </iframe>
 <iframe style="display:none" src="updateUser.html" name="updaU" id="updaU" width="100%" height="550px" > </iframe>
</div>
</div>
</body>
</html>